package org.deng.learn.designpattern.observer;

/**
 * @author DengLibin
 * @Description
 * 观察者
 * @Date 2019/2/15 0015 14:38
 */
public class User implements Observer {
    private String name;
    public User(String name){this.name = name;}
    @Override
    public void update(String msg) {
       System.out.println(name+" 收到消息:"+msg);
    }
}
